﻿#region COPYRIGHT© 2005-2013 Phillip Clark. All rights reserved.

// For licensing information see License.txt (MIT style licensing).

#endregion

namespace FlitBit.Parse
{
	internal class MatchEndOfInput : Match
	{
		public MatchEndOfInput()
			: base(MatchKind.Exact)
		{}

		public override bool At(char[] input, Cursor cursor)
		{
			return cursor.Offset == input.Length - 1;
		}

		public override bool At(string input, Cursor cursor)
		{
			return cursor.Offset == input.Length - 1;
		}

		public override bool TryAt(char[] input, ref Cursor cursor)
		{
			return cursor.Offset == input.Length - 1;
		}

		public override bool TryAt(string input, ref Cursor cursor)
		{
			return cursor.Offset == input.Length - 1;
		}
	}
}